package fristphase.day03;

public class FindMaxNumber {
    public static void main(String[] args) {
        int[] a = new int[10];
        for(int i=0;i<a.length;i++){
            a[i] = (int)(Math.random()*100);
        }
        for (int i=0;i< a.length;i++){
            for (int j = 0; j < a.length; j++) {
                if(j+1<a.length){
                    int maxNum = a[j];
                    int minNum = a[j+1];

                    if(maxNum>minNum){
                        a[j+1] = maxNum;
                        a[j] = minNum;
//                        a[j] = a[j+1];
//                        a[j+1] = maxNum;
                    }
            }

            }

        }
        for (int i = 0; i < a.length; i++) {
            System.out.println(a[i]);
        }

    }
}
